home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat1 / pack.z / pack
Text File  |  1998-10-20  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4. PPPPAAAACCCCKKKK((((1111))))                                                                PPPPAAAACCCCKKKK((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      pack, pcat, unpack - compress and expand files
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ppppaaaacccckkkk [ ---- ] [ ----ffff ] name ...
  13.  
  14.      ppppccccaaaatttt name ...
  15.  
  16.      uuuunnnnppppaaaacccckkkk name ...
  17.  
  18. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      _p_a_c_k attempts to store the specified files in a compressed form.
  20.      Wherever possible (and useful), each input file _n_a_m_e is replaced by a
  21.      packed file _n_a_m_e....zzzz with the same access modes, access and modified dates,
  22.      and owner as those of _n_a_m_e.  The ----ffff option will force packing of _n_a_m_e.
  23.      This is useful for causing an entire directory to be packed even if some
  24.      of the files will not benefit.  If _p_a_c_k is successful, _n_a_m_e will be
  25.      removed.  Packed files can be restored to their original form using
  26.      _u_n_p_a_c_k or _p_c_a_t.
  27.  
  28.      _p_a_c_k uses Huffman (minimum redundancy) codes on a byte-by-byte basis.  If
  29.      the ---- argument is used, an internal flag is set that causes the number of
  30.      times each byte is used, its relative frequency, and the code for the
  31.      byte to be printed on the standard output.  Additional occurrences of ----
  32.      in place of _n_a_m_e will cause the internal flag to be set and reset.
  33.  
  34.      The amount of compression obtained depends on the size of the input file
  35.      and the character frequency distribution.  Because a decoding tree forms
  36.      the first part of each ....zzzz file, it is usually not worthwhile to pack
  37.      files smaller than three blocks, unless the character frequency
  38.      distribution is very skewed, which may occur with printer plots or
  39.      pictures.
  40.  
  41.      Typically, text files are reduced to 60-75% of their original size.  Load
  42.      modules, which use a larger character set and have a more uniform
  43.      distribution of characters, show little compression, the packed versions
  44.      being about 90% of the original size.
  45.  
  46.      _p_a_c_k returns a value that is the number of files that it failed to
  47.      compress.
  48.  
  49.      No packing will occur if:
  50.  
  51.           the file appears to be already packed;
  52.           the file has links;
  53.           the file is a directory;
  54.           the file cannot be opened;
  55.           no disk storage blocks will be saved by packing;
  56.           a file called _n_a_m_e....zzzz already exists;
  57.           the ....zzzz file cannot be created;
  58.           an I/O error occurred during processing.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. PPPPAAAACCCCKKKK((((1111))))                                                                PPPPAAAACCCCKKKK((((1111))))
  71.  
  72.  
  73.  
  74.      Directories cannot be compressed.
  75.  
  76.      _P_c_a_t does for packed files what _c_a_t(1) does for ordinary files, except
  77.      that _p_c_a_t cannot be used as a filter.  The specified files are unpacked
  78.      and written to the standard output.  Thus to view a packed file named
  79.      _n_a_m_e....zzzz use:
  80.  
  81.           pcat name.z
  82.      or just:
  83.           pcat name
  84.  
  85.      To make an unpacked copy, say _n_n_n, of a packed file named _n_a_m_e....zzzz (without
  86.      destroying _n_a_m_e....zzzz) use the command:
  87.  
  88.           pcat name >nnn
  89.  
  90.      _P_c_a_t returns the number of files it was unable to unpack.  Failure may
  91.      occur if:
  92.  
  93.           the file cannot be opened;
  94.           the file does not appear to be the output of _p_a_c_k.
  95.  
  96.      _U_n_p_a_c_k expands files created by _p_a_c_k.  For each file _n_a_m_e specified in
  97.      the command, a search is made for a file called _n_a_m_e....zzzz (or just _n_a_m_e, if
  98.      _n_a_m_e ends in ....zzzz).  If this file appears to be a packed file, it is
  99.      replaced by its expanded version.  The new file has the ....zzzz suffix
  100.      stripped from its name, and has the same access modes, access and
  101.      modification dates, and owner as those of the packed file.
  102.  
  103.      _U_n_p_a_c_k returns a value that is the number of files it was unable to
  104.      unpack.  Failure may occur for the same reasons that it may in _p_c_a_t, as
  105.      well as for the following:
  106.  
  107.           a file with the ``unpacked'' name already exists;
  108.           if the unpacked file cannot be created.
  109.  
  110. NNNNOOOOTTTTEEEESSSS
  111.      The suffix ....zzzz is used by the commands _p_a_c_k/_u_n_p_a_c_k. The suffix ....ZZZZ is used
  112.      by the commands _c_o_m_p_r_e_s_s/_u_n_c_o_m_p_r_e_s_s. The suffix ....ggggzzzz is used by the
  113.      commands _g_z_i_p/_g_u_n_z_i_p.
  114.  
  115. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  116.      compress(1), uncompress(1), cat(1), gzip(1), gunzip(1).
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.